const http = require('http');
const fs = require('fs');

const server = http.createServer((req,res) => {
    //读取文件内容
    let html = fs.readFileSync('./example.html');
    res.end(html);
});
server.listen(9000,()=>{
    console.log('this server is been started');
})